package com.theredspace.urbanexpressions {
	
	import com.theredspace.urbanexpressions.controller.StartUpCommand;
	
	import org.puremvc.as3.interfaces.IFacade;
	import org.puremvc.as3.patterns.facade.Facade;
	import org.puremvc.as3.patterns.observer.Notification;

	public class ApplicationFacade extends Facade implements IFacade {

		public static const APP_STARTUP:String = "AppStartUp";
		
		public static function getInstance():ApplicationFacade {
			if ( instance == null ) instance = new ApplicationFacade();

			return instance as ApplicationFacade;
		}		
		
		override protected function initializeController():void {
			super.initializeController();

			registerCommand(APP_STARTUP, StartUpCommand);
		}

		public function startup(app:UrbaneExpressionsMain):void {			
			sendNotification(ApplicationFacade.APP_STARTUP, app);
		}
	}
}